<!DOCTYPE html>
<html lang="utf-8">
<head>
    <meta name="generator"
          content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39"/>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>易备安数据管理平台</title>     
    <link rel="stylesheet" type="text/css" href="/web/css/basic.css">
    <link rel="stylesheet" type="text/css" href="/web/css/client-common.css">
    <link rel="stylesheet" type="text/css" href="/web/css/g.css">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="/web/js/jquery/jquery.min.js"></script>
	<script src="/web/js/jquery_rest.js"></script>
	<script src="/web/js/ebeim.js"></script>
	
	<style type="text/css">
		.push-message{
			position:fixed;
			_position:absolute;
			left:100%;
			bottom:50px;
			background:#fff;
			border-radius:5px;
			display:block;
			background:#CACF87;
			overflow:hidden;
			width:100%;
			height:50px;
			line-height:50px;
		}
		.push-message .push-span{
			padding:0 15px;
		}
		.closeBtn{
			background:#8B8E62;
			cursor:pointer;
			position:absolute;
			top:0;
			right:0;
			height:50px;
			width:50px;
			line-height:50px;
			text-align: center;
		}
		.closeBtn:hover{
			background:#727451;
			color:#fff;
		}
	</style>
	
	<script type="text/javascript">
		var service = new EbeimService();
		var $W = $(window).width();
		var $H = $(window).height();
		$(window).load(function(){
			setInterval(function(){
				service.getPushMessage(pushMessageCB);
			}, 60000);
			service.getUserInfo(userInfoCB);
		});
		var pushMessageCB = function(data){
			var json = eval("("+data+")");
			if(json.code == "200"){
				var list = json.list;
				var content = "";
				for(var i = 0;i<list.length;i++){
					content = content
						+"<span class='push-span'>"
						+"【"+list[i].pushMessageTitle+"："+list[i].pushMessageContent+"】"
						+"</span>";
				}
				if(list.length > 0){
					$("#message-marquee").append(content);
					$(".push-message").animate({"left":"0"},"slow");
				}
			}
		}
		function closePushMessage(){
			$(".push-message").animate({"left":"100%"},"slow");
			$("#message-marquee").html("");
		}
		function logout(){
			service.logout(logoutCB);
		}
		var logoutCB = function(data){
			var json = eval("("+data+")");
			window.location.href="/web/html/login.html";
		}
		var userInfoCB = function(data){
			var json = eval("("+data+")");
			$("#session_username").html(json.user.username);
			$("#authStartTime").val(json.ca.authStartTime);
			$("#authEndTime").val(json.ca.authEndTime);
			$("#customerName").val(json.customer.name);
		}
	</script>
	
</head>
<body>
<input type="hidden" id="authStartTime" />
<input type="hidden" id="authEndTime" />
<input type="hidden" id="customerName" />
<!--header  -->
<nav class="header">
     <div class="container-fluid">
         <a class="brand fl">
             <img src="images/brand_logo.png" height="63" width="63" alt="logo">
         </a>
         <div class="brand-title-long fl">
             <img src="images/brand_title_long.png" height="63" width="360">
         </div>
         <div class="brand-title-short fl">
             <img src="images/brand_title_short.png" height="63" width="119">
         </div>
         <div id="navbar" class="navbar-collapse collapse">
             <ul class="nav navbar-nav" id="myTab">
                 <li class="active">
                     <a href="#home" onclick="reload()">首页</a>
                 </li>
                 <li>
                     <a href="#safebox">数据保险箱</a>
                 </li>
                 <li>
                     <a href="#datasource">数据源管理</a>
                 </li>
                 <li>
                     <a href="#recovery">数据恢复</a>
                 </li>
                 <li>
                     <a href="#recoveryRecords">恢复记录</a>
                 </li>
                 <li>
                     <a href="#info">授权信息</a>
                 </li>
             </ul>
             <div class="welcome fr clearfix">
             	<a href="http://new.ebeim.com/?c=menus&a=service" target="_blank" class="clearfix"><em class="icos icos-help"></em><span>帮助</span></a>
                <a href="javascript:;" class="clearfix"><em class="icos icos-user"></em><span id="session_username"></span></a>
                <a href="javascript:logout();" class="clearfix"><em class="icos icos-power"></em><span>安全退出</span></a>
            </div>
         </div>
          
     </div>
     
 </nav>
    <!-- Main component for a primary marketing message or call to action -->
    <div class="container" style="height:800px;">
        <div id="content" class="tab-content" style="height:800px">
            <div class="tab-pane active" id="home" style="height:800px;">
                <iframe width="100%" height="100%" frameborder="0" src="html/home.html"></iframe>
            </div>
            <div class="tab-pane" id="safebox" style="height:800px;">
                <iframe id="safeFrame" width="100%" height="100%" frameborder="0" src=""></iframe>
            </div>
            <div class="tab-pane" id="datasource" style="height:800px;">
                <iframe id="dsFrame" width="100%" height="100%" frameborder="0" src=""></iframe>
            </div>
            <div class="tab-pane" id="recovery" style="height:800px;">
                <iframe id="rFrame" width="100%" height="100%" frameborder="0" src=""></iframe>
            </div>
            <div class="tab-pane" id="recoveryRecords" style="height:800px;">
                <iframe id="rRFrame" width="100%" height="100%" frameborder="0" src=""></iframe>
            </div>
            <div class="tab-pane" id="info" style="height:800px">
                <iframe id="infoFrame" width="100%" height="100%" frameborder="0" src=""></iframe>
            </div>
        </div>
    </div>
 
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/web/js/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->

<script src="/web/js/bootstrap/bootstrap.min.js"></script>
<script src="/web/js/client-common.js"></script>
<script>
    $(function () {
        $('.active a[href="#home"]' ).click(function(e){
        	    location.reload();
        })
        $('#myTab a[href="#datasource"]').click(function (e) {          
            $('#dsFrame').attr('src', 'html/datasource.html');
        });
        $('#myTab a[href="#recovery"]').click(function (e) {
            $('#rFrame').attr('src', 'html/recovery.html');
        });
        $('#myTab a[href="#recoveryRecords"]').click(function (e) {
            $('#rRFrame').attr('src', 'html/recoveryRecords.html');
        });
        $('#myTab a[href="#safebox"]').click(function (e) {
            $('#safeFrame').attr('src', 'html/safebox.html');
        });
        $('#myTab a[href="#info"]').click(function (e) {
            $('#infoFrame').attr('src', 'html/info.html');
        });
        $('#myTab a').click(function (e) {
            e.preventDefault();//阻止a链接的跳转行为
            $(this).tab('show');//显示当前选中的链接及关联的content
        });
    });
    
</script>

<div class="push-message">
	<marquee id="message-marquee" behavior="scroll" direction="left" height="50px" width="100%" loop="-1" scrollamount="10" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()">
	新消息：</marquee>
	<div class="closeBtn" onclick="closePushMessage()">关闭</div>
</div>
</body>
</html>
